package cn.com.elite.util;

import org.apache.struts.action.*;
import javax.servlet.http.*;
import org.apache.struts.actions.*;

public class NonSessionAction
    extends DispatchAction {
  public ActionForward execute(ActionMapping mapping,
                               ActionForm form,
                               HttpServletRequest request,
                               HttpServletResponse response) throws Exception {
    //����execute����
    try {
    	System.out.println(request.getQueryString());
        String action = Util.filter(request.getParameter("action"));
//        if(action.equals("login") || action.equals("logout")){
//            return super.execute(mapping, form, request, response);
//        }
//
//        HttpSession session = request.getSession();
//        String LOGINTYPE = Util.filterForObject(session.getAttribute("LOGINTYPE"));
//        if(LOGINTYPE.equals("")){
//            LOGINTYPE = Util.filter(request.getParameter("logintype"));
//        }
//        if(LOGINTYPE.equals("")){
//            return mapping.findForward("logout");
//        }

      return super.execute(mapping, form, request, response);
    }
    catch (Exception e) {
      request.setAttribute("message", "����ʧ�ܣ�" + e.getMessage());
      request.setAttribute("hav_url", "1");
      return mapping.findForward("message");
    }
  }

}
